Xbasic

UI_SHAPE_POLY Function

Syntax

V UI_SHAPE_POLY(C shape,N x,N y[,C shape_operation])

Arguments

shape

The name of the shape to draw.

x

The horizontal coordinate of the line end point. Larger values move right.

y

The vertical coordinate of the line end point. Larger values move down.

shape_operation

Optional. Default = erase previous shape. An indication of how to combine the shape with other shapes.

"and" = show only the intersection of the rectangle and any other shapes.
"or" = show both the union of the rectangle and any other shapes.
"xor" = show both the rectangle and any other shapes, but do not show their intersection.

Description

The UI_SHAPE_POLY() function draws a line from the current position to the specified end point and terminates a polygon definition.

images/GR_ui_shape_start_poly.gif
ui_bitmap_create("test", 4, 2)
ui_bitmap_draw("test", <<%code%
set_origin(0,0)
inner_rect(0, 0, 4, 2)
set_pen("black")
set_brush("green")
ui_shape_start_poly("five", 1.5, .4)
ui_shape_lineto("five", 3, .75)
ui_shape_lineto("five", 2.3, 1.75)
ui_shape_lineto("five", 1.4, 1.65)
ui_shape_lineto("five", .75, 1)
ui_shape_poly("five", 1.5, .4)
fill_shape("five", 0,0)
%code%)
ui_dlg_box("", "{image=test}")

Limitations

This function is only used in the Code sections of UI_BITMAP_DRAW(), UI_SCREEN_DRAW(), and UI_PRINTER_DRAW().

See Also